Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
=======================================
Coverage 96.22% 96.22%
=======================================
Files 1 1
Lines 106 106
=======================================
Hits 102 102
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@ChrisRackauckas let's roll-up an agent review on my agent assisted PR. Should be fine, but another check doesn't hurt, well, additional energy consumption. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This issue has been annoying me for a while now. With some 🤖 assistance here is a solution.
🤖
Cause
Polyester builds a
@cfunctionfrom thebatchbody. Thedoblock capturedf(andcheck), so whenfcarries data the block is not a singleton. Polyesterthen needs a runtime closure cfunction, which Julia only supports on x86/x86_64.
Changes
fandcheckthroughbatch's argument tuple instead ofcapturing them. The
doblock captures nothing and stays a singleton on everyplatform. No behaviour change on x86.
closures capturing datatest set that coversthreaded_gradient!and both
threaded_jacobian!methods with data-capturing closures, withVal{false}()andVal{true}(), a length that isn't a multiple of the chunksize, and repeated runs with an allocating loss.
macos-latest(aarch64) jobs for Julia1and~1.10.0-0. The newtests only catch this bug on Arm with more than one thread, and the existing
matrix is Linux x86/x64 only. The jobs use the same
JULIA_NUM_THREADS=5.Testing
Locally on Apple silicon (Julia 1.13.4): the new tests error with the message
above on the old code and pass with the fix, with both 8 threads and 1 thread.
closes #36